<template>
  <div>
    <div v-html="alipayWap"
         ref="alipayWap"></div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      alipayWap: '',
    }
  },
  created () {
    console.log('nnjhjhjsaxjsx')
    let date = new Date().getTime();
    this.$axios.post("http://localhost/8888/login/pay", {
      money: 248.00,
      subject: "缴费",
      time: date,
    }).then(res => {
      console.log(res.data);
      this.alipayWap = res.data;
      this.$nextTick(() => {
        this.$refs.alipayWap.children[0].submit();
      })
    })
      .catch(err => {
        console.log(err);
      })
  }
}
</script>
<style lang="less" >
</style>